package tech.aister.interceptor;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.HandlerInterceptor;

/**
 * 本来用来演示: 登录的拦截器
 *
 * @author success
 * @date 2025/3/4 15:18:50
 */
public class LoginInterceptor implements HandlerInterceptor {
    /**
     * 进入目标handler之前执行
     * @param request
     * @param response
     * @param handler
     * @return
     * @throws Exception
     */
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("拦截器~");
        return false;//true代表放行,false代表拦截
    }
}